<?php

class Sgit_Util_getDateRange
{

        static public function run($get,$col){
            if(empty($get)) return true;
                        
            $fechas=explode('-',$get);

            if(count($fechas)==2){

                $start=Utiles::date2EN(trim($fechas[0]));
                $end=Utiles::date2EN(trim($fechas[1]));

                $sql= " ($col BETWEEN '$start' AND '$end') ";
                
            }else{
                $fecha=Utiles::date2EN(trim($fechas[0]));
                $sql= " ($col = '$fecha') ";
            }

           return $sql;
    }

}
